<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>


        // 正则的修饰符   
        //    i   ignore 忽略
        //    g   global 全局匹配



        //  tmd  TMD   Tmd   tMd    大小写的问题


        var reg = /tmd/ig;

        var str = 'tmD';

        console.log(reg.test(str));




    </script>

</body>

</html>